import 'package:flutter/cupertino.dart';

class LoginModel extends ChangeNotifier {
  String _account = '';
  String _passwd = '';
  double _top = 100;

  get top => _top;
  get passwd => _passwd;
  get account => _account;

  void setAccount(String value) {
    _account = value;
    // 通知监听器（订阅者），重新构建InheritedProvider， 更新状态。
    notifyListeners();
  }

  void setPasswd(String value) {
    _passwd = value;
    notifyListeners();
  }

  void setTop(double value) {
    _top = value;
    notifyListeners();
  }
}
